package com.niiwoo.civet.trade.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by bincun on 2017/12/11.
 * 批次还款类型，与存管无关
 */
@Getter
@AllArgsConstructor
public enum  BatchRefundTypeEnum {
    NORMAL_REFUND((byte)0,"还款人正常还款"),
    NEED_WITHHOLD_REFUND((byte)1,"需代扣-还款"),
    NEED_GUARANTEE_REFUND((byte)2,"需垫付-还款"),
    GUARANTEE((byte)3,"担保方垫付"),
    OVER_DEBT((byte)4,"还款人主动提前结清");

    public static BatchRefundTypeEnum enumOf(byte value) {
        for (BatchRefundTypeEnum statusEnum : values()) {
            if (statusEnum.value.equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
    private Byte value;
    private String desc;
}
